<template>
  <div>
      <el-container>
          <el-aside width="220px">
              <!-- 左侧菜单栏 -->
              <el-menu
                      :router="true"
                      default-active="2"
                      class="el-menu-vertical-demo"
                      @open="handleOpen"
                      @close="handleClose"
              >
                  <el-menu-item index="info">
                      <i class="el-icon-user"></i>
                      <span>个人基本信息</span>
                  </el-menu-item>

                  <el-menu-item index="businesses_info" v-if="user.isBusinesses !== 1">
                      <i class="el-icon-chat-dot-round"></i>
                      <span>申请成为商户</span>
                  </el-menu-item>

                  <el-menu-item index="merchantsInfo" v-if="user.isBusinesses === 1">
                      <i class="el-icon-chat-dot-round"></i>
                      <span>商户基本信息</span>
                  </el-menu-item>

                  <el-menu-item index="merchantsOrderInfo" v-if="user.isBusinesses === 1">
                      <i class="el-icon-chat-dot-round"></i>
                      <span>商户订单管理</span>
                  </el-menu-item>

                  <el-menu-item index="suppliers_info" v-if="user.isVendor !== 1">
                      <i class="el-icon-headset"></i>
                      <span>申请成为供货商</span>
                  </el-menu-item>

                  <el-menu-item index="supplierInfo" v-if="user.isVendor === 1">
                      <i class="el-icon-chat-dot-round"></i>
                      <span>供货商基本信息</span>
                  </el-menu-item>

                  <el-menu-item index="frontSuppliersList" v-if="user.isVendor === 1">
                      <i class="el-icon-headset"></i>
                      <span>供货商报价</span>
                  </el-menu-item>

                  <el-menu-item index="suppliersMaintenance" v-if="user.isVendor === 1">
                      <i class="el-icon-headset"></i>
                      <span>供货商报价维护</span>
                  </el-menu-item>

                  <el-menu-item index="suppliersOrderInfo" v-if="user.isVendor === 1">
                      <i class="el-icon-headset" ></i>
                      <span>供货商订单管理</span>
                  </el-menu-item>
              </el-menu>
          </el-aside>
          <el-main>
              <router-view></router-view>
          </el-main>
      </el-container>
  </div>
</template>

<script>
export default {
    name: "Front_UsersInfo",
    data() {
        return {
            activeIndex: '1',
            squareUrl: "",//logo图片
            input: '',//查询框
            user:{},
        };
    },
    methods:{
        goods(){
            this.$router.push('/goodsAll')
        },
        handleSelect(key, keyPath) {
            console.log(key, keyPath);
        },
        handleOpen(key, keyPath) {
            console.log(key, keyPath);
        },
        handleClose(key, keyPath) {
            console.log(key, keyPath);
        },
    },
    created() {
        this.user = JSON.parse(sessionStorage.getItem('user'));
    }
}
</script>

<style scoped>
.time {
    font-size: 13px;
    color: #999;
}

.bottom {
    margin-top: 13px;
    line-height: 12px;
}

.button {
    padding: 0;
    float: right;
}

.image {
    width: 100%;
    display: block;
}

.clearfix:before,
.clearfix:after {
    display: table;
    content: "";
}

.clearfix:after {
    clear: both
}
</style>